/**
 * SPDX-FileCopyrightText: 2023-2025 Sangfor Technologies Inc.
 * SPDX-License-Identifier: Mulan PSL v2
 */
import {
    getEncryptor
} from 'src/util/rsa';

export default {
    encrypt: (state) => (password) => {
        return getEncryptor(state.rsaModulus, state.rsaPublicKey)(password);
    },

    isSuperAdmin: (state) => state.roleType.admin,
    isGroupAdmin: (state) => state.roleType.group_admin,
    isAdmin:(state) => state.isAdmin,
    userId:(state) => state.userId
};
